# from https://hub.mos.ru/mos/src/plasma-desktop/-/tree/mos-v5.27.10
%define commit 1d89282ed9948ec9ddba5a003cfa4e269dfb2971
%define commit_short %(echo %{commit} | head -c6)

Summary:	Plasma 5 desktop custom module for MOS
Name:		plasma5-desktop-mos
Version:	5.27.10
Release:	0.git%{commit_short}.2
License:	GPLv2+
Group:		Graphical desktop/KDE
Url:		https://os.mos.ru
Source0:	https://hub.mos.ru/mos/src/plasma-desktop/-/archive/%{commit}.tar.gz?/%{name}-%{commit}.tar.gz
Source1:	plasma5-desktop-mos.rpmlintrc
BuildRequires:	%{_bindir}/msgfmt
BuildRequires:	kde5-macros
BuildArch:	noarch
Requires: mos-icons-core-classic

%description
%{summary}

#----------------------------------------------------------------------------

%package -n plasma5-applet-kickoff-mos
Summary:	Plasma 5 Kickoff menu for MOS
Provides:	plasma5-applet-kickoff = %{EVRD}
Conflicts:	plasma5-applet-kickoff < %{EVRD}
Conflicts:	plasma5-applet-kickoff > %{EVRD}
Requires:	plasma5-workspace >= %{version}

%description -n plasma5-applet-kickoff-mos
%{summary}

%files -n plasma5-applet-kickoff-mos
%{_kde5_datadir}/plasma/plasmoids/org.kde.plasma.kickoff
%lang(ru) %{_kde5_datadir}/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.kickoff.mo

#----------------------------------------------------------------------------

%package -n plasma5-applet-kicker-mos
Summary:	Plasma 5 Kicker menu for MOS
Provides:	plasma5-applet-kicker = %{EVRD}
Conflicts:	plasma5-applet-kicker < %{EVRD}
Conflicts:	plasma5-applet-kicker > %{EVRD}
Requires:	plasma5-workspace >= %{version}

%description -n plasma5-applet-kicker-mos
%{summary}

%files -n plasma5-applet-kicker-mos
%{_kde5_datadir}/plasma/plasmoids/org.kde.plasma.kicker
%lang(ru) %{_kde5_datadir}/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.kicker.mo

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n plasma-desktop-%{commit}

%install

mkdir -p %{buildroot}%{_kde5_datadir}/plasma/plasmoids/org.kde.plasma.kickoff
cp -rv applets/kickoff/package/* %{buildroot}%{_kde5_datadir}/plasma/plasmoids/org.kde.plasma.kickoff

mkdir -p %{buildroot}%{_kde5_datadir}/plasma/plasmoids/org.kde.plasma.kicker
cp -rv applets/kicker/package/* %{buildroot}%{_kde5_datadir}/plasma/plasmoids/org.kde.plasma.kicker

mkdir -p %{buildroot}%{_kde5_datadir}/locale/ru/LC_MESSAGES
msgfmt po/ru/plasma_applet_org.kde.plasma.kickoff.po -o %{buildroot}%{_kde5_datadir}/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.kickoff.mo
msgfmt po/ru/plasma_applet_org.kde.plasma.kicker.po -o %{buildroot}%{_kde5_datadir}/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.kicker.mo
